/**
 * Advanced Software Engineering (Monica Farrow)
 * CollectedParcelLastNameComparator class
 * 
 * The structure of this class has been based on lecture notes provided by
 * Monica Farrow as a part of Software Engineering courses at Heriot-Watt University.
 */

package depotAdmin;

import java.util.Comparator;

import depot.Customer;

/**
 * CollectedParcelLastNameComparator class allowing 2 customers to be ordered
 * by last name
 * @author Ionut Iordache, Nikky Afunugo, Dave Bond
 */
public class CollectedParcelLastNameComparator implements Comparator<Customer>  {

	/** 
	 * returns an int - 1, 0, or -1
	 * resulting from the comparison of the two Customer objects
	 * allowing them to be places in last name order
	 * @param c1  the 1st Customer to be compared
	 * @param c2  the 2nd Customer to be compared
	 * @return the comparison int
	 */	
	public int compare(Customer c1, Customer c2) {
		return c1.getLastName().compareTo(c2.getLastName());
	}
}